Instead of injecting them into the C compiler arguments.
/* Define to 1 if linux/memfd.h exists */
#mesondefine HAVE_LINUX_MEMFD_H
+#mesondefine GTK_SYSCONFDIR
+
#mesondefine GTK_LOCALEDIR
#mesondefine GTK_DATADIR
input : 'gtkversion.h.in',
output : 'gtkversion.h',
configuration: gtkversion_cdata,
- install_dir: 'include/gtk-4.0/gtk/'
+ install_dir: 'include/gtk-4.0/gtk'
)
gtk_cargs = [
'-DGTK_COMPILATION',
'-DG_LOG_DOMAIN="Gtk"',
'-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED',
- '-DGTK_BINARY_VERSION="' + gtk_binary_version + '"',
- '-DGTK_HOST="' + host_machine.system() + '"',
- '-DGTK_SYSCONFDIR="' + get_option('sysconfdir') + '"',
- '-DGTK_DATA_PREFIX="'+ get_option('prefix') + '"',
+ '-DGTK_BINARY_VERSION="@0@"'.format(gtk_binary_version),
+ '-DGTK_HOST="@0@"'.format(host_machine.system()),
+ '-DGTK_DATA_PREFIX="@0@"'.format(gtk_prefix),
]
gtk_gen_headers = [gtkmarshal_h, gtktypebuiltins_h, gtkprivatetypebuiltins_h, gtkversion]
gtk_libdir = join_paths(gtk_prefix, get_option('libdir'))
gtk_datadir = join_paths(gtk_prefix, get_option('datadir'))
gtk_localedir = join_paths(gtk_prefix, get_option('localedir'))
+gtk_sysconfdir = join_paths(gtk_prefix, get_option('sysconfdir'))
cc = meson.get_compiler('c')
cdata.set_quoted('GTK_LOCALEDIR', gtk_localedir)
cdata.set_quoted('GTK_DATADIR', gtk_datadir)
cdata.set_quoted('GTK_LIBDIR', gtk_libdir)
+cdata.set_quoted('GTK_SYSCONFDIR', gtk_sysconfdir)
cdata.set_quoted('GETTEXT_PACKAGE', 'gtk40')
cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
cdata.set('GTK_MINOR_VERSION', gtk_minor_version)